package com.pro.controller;

import com.pro.pojo.JsCourseJournal;
import com.pro.pojo.JsonData;
import com.pro.service.JsCourseJournalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * ClassName:JsCourseJournalController
 * Package:com.pro.controller
 * Description:
 *
 * @Date:2022/1/12 11:29
 * @Author: ZPT
 */
@RestController
@RequestMapping("/courseJournal")
public class JsCourseJournalController {
    @Autowired
    private JsCourseJournalService courseJournalService;

    /**
     *
     * @author ZPT
     * @date 2022/1/12 11:26
     * @content :查看历史价格详细
     */
    @RequestMapping("/getCourseJournal")
    public JsonData getCourseJournal(JsCourseJournal courseJournal){
        List<JsCourseJournal> courseJournalList = courseJournalService.getCourseJournal(courseJournal);
        return courseJournalList!=null?JsonData.buildSuccess(courseJournalList):JsonData.buildError("服务端错误");
    }
}
